package com.huitone.gddw.service.impl.worktable;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huitone.gddw.dao.entity.PrgExtInfo;
import com.huitone.gddw.dao.worktable.paramconfigmanage.IPrgExtInfoDao;
import com.huitone.gddw.service.IPrgExtInfoService;
import com.huitone.gddw.utils.SysLoginUtil;

/**
* @Title PrgExtInfoService
* @Package com.huitone.gddw.service.impl
* @Description TODO
* @author chengsiyue
* @date 2017年4月22日 下午2:36:00
* @version V1.0   
*/
@Service
public class PrgExtInfoService implements IPrgExtInfoService{
	@Autowired
	private IPrgExtInfoDao prgExtInfoDao;
	@Override
	public PrgExtInfo selectByPrimaryKey(String recId) {
		return prgExtInfoDao.selectByPrimaryKey(recId);
	}

	@Override
	public List<PrgExtInfo> selectByPrgId(String prgId) {
		return prgExtInfoDao.selectByPrgId(prgId);
	}
	@Override
	public int save(PrgExtInfo prgExtInfo) {

		prgExtInfo.setInsertStaffId(SysLoginUtil.getLoginUserId());
		prgExtInfo.setInsertTime(new Date());
		return prgExtInfoDao.save(prgExtInfo);
	}

	@Override
	public int update(PrgExtInfo prgExtInfo) {

		prgExtInfo.setLastModStaffId(SysLoginUtil.getLoginUserId());
		prgExtInfo.setLastModTime(new Date());
		return prgExtInfoDao.update(prgExtInfo);

	}
	@Override
	public int deleteById(String recId) {
		return prgExtInfoDao.deleteById(recId);
	}
	@Override
	public int updateStatus(String prgId) {
		return prgExtInfoDao.updateStatus(prgId);
	}

	@Override
	public int updateByPrimaryKey(PrgExtInfo prgExtInfo) {
		prgExtInfo.setLastModStaffId(SysLoginUtil.getLoginUserId());
		prgExtInfo.setLastModTime(new Date());
		return prgExtInfoDao.updateByPrimaryKey(prgExtInfo);
	}

}
